<div class="MSG01-dialog" ng-class="[dialog.mode]">
    <!-- 20230406 modify by Alan for#131754 :  -->
    <div class="kmi-text-fields title">
        <label class="label" ng-bind="dialog.mailItem.title | translate"></label>
        <!-- <div class="kmi-side-btn" ng-click="dialog.close();">
            <img src="image/icons/clear.png"></img>
            <div class="kmi-can-click"></div>
        </div> -->
    </div>
    <div class="kmi-text-fields fields-input">
        <label class="label value-input" ng-bind="'mailbox.title.name' | translate"></label>
        <input class="value-input" ng-model="dialog.mailItem.title"></input>
    </div>
    <!--安燈資訊-->
    <div class="kmi-text-fields fields-slight" ng-if="dialog.showSlight();">
        <!--安燈類型-->
        <label class="label" ng-bind="'mailbox.slight_type_name' | translate"></label>
        <label class="label value-show"ng-bind="'mailbox.slight_type.t_' + dialog.mailItem.slight_type_no | translate"></label>
        <input class="value-input" ng-model="dialog.mailItem.slight_type_name" readonly="readonly" ng-click="dialog.changeSlightType();"></input>
        <div class="tip tip-input"><i class="material-icons">&#xE5CF;</i></div>
        <!--安燈等級-->
        <div class="record-time-wrapper">
            <label class="label"ng-bind="'mailbox.slight_level' | translate"></label>
            <div class="check-point-switch" ng-class="{'is-selected':dialog.mailItem.slight_level == 2}" ng-click="dialog.changeSlightLevel();">
                <div></div>
            </div>
        </div>
    </div>
    <!--收件對象-->
    <div class="kmi-text-fields">
        <label class="label value-show" ng-bind="'mailbox.sender' | translate"></label>
        <label class="value value-show" ng-bind="dialog.mailItem.sender_name"></label>
        <label class="label value-input" ng-bind="'mailbox.receiver' | translate"></label>
        <input class="value-input" readonly="readonly" ng-model="dialog.mailItem.sender_name"
            ng-click="dialog.clickReceiver();"></input>
        <div class="tip tip-input"><i class="material-icons">&#xE5CF;</i></div>
    </div>
    <div class="kmi-text-fields">
        <label class="label" ng-bind="'mailbox.receive_date' | translate"></label>
        <label class="value" ng-bind="dialog.mailItem.send_date"></label>
    </div>
    <div class="kmi-text-fields  fields-input">
        <label class="label" ng-bind="'mailbox.target' | translate"></label>
        <input class="value-input" readonly="readonly" ng-model="dialog.mailItem.LinkProgramName" ng-click="dialog.clickTarget();"></input>
        <div class="tip tip-input"><i class="material-icons">&#xE5CF;</i></div>
    </div>
    <div class="kmi-text-fields">
        <label class="label" ng-bind="'mailbox.urgency' | translate"></label>
        <div class="light-item">
            <div class="kmi-button is-select"
                ng-class="{'light-red':dialog.mailItem.urgency == '3', 'light-yellow':dialog.mailItem.urgency == '2', 'light-green':dialog.mailItem.urgency == '1'}">
                <label ng-bind="'mailbox.urgency_'+dialog.mailItem.urgency  | translate"></label>
            </div>
        </div>
        <div class="light-content">
            <div class="kmi-button light-red" ng-class="{'is-select':dialog.mailItem.urgency == '3'}"
                ng-click="dialog.clickUrgency('3');">
                <div class="tip">
                    <div class="dashboard-light-panel red"></div>
                </div>
                <label ng-bind="'mailbox.urgency_3' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
            <div class="kmi-button light-yellow" ng-class="{'is-select':dialog.mailItem.urgency == '2'}"
                ng-click="dialog.clickUrgency('2');">
                <div class="tip">
                    <div class="dashboard-light-panel yellow"></div>
                </div>
                <label ng-bind="'mailbox.urgency_2' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
            <div class="kmi-button light-green" ng-class="{'is-select':dialog.mailItem.urgency == '1'}"
                ng-click="dialog.clickUrgency('1');">
                <div class="tip">
                    <div class="dashboard-light-panel green" class="red"></div>
                </div>
                <label ng-bind="'mailbox.urgency_1' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
        </div>
    </div>
    <div class="kmi-text-fields fields-input">
        <label class="label" ng-bind="'mailbox.receive_type' | translate"></label>
        <div class="receiver-type-content">
            <div class="receiver-type-item" ng-repeat="type in dialog.mailItem.receiverTypes" ng-show="type.isSelect">
                <label ng-bind="type.pipe_name"></label>
                <button class="mdl-button mdl-button--icon" ng-click="dialog.cancelType(type);">
                    <img src="image/icons/clear.png"></img>
                </button>
            </div>
        </div>
        <!-- 20221024 modify by Alan for#120994 : 更換icon -->
        <div class="tip search tip-input" ng-click="dialog.addReceiverType();"><img src="image/smes_v340/W_Com_SS_Add_nor_32.png"></img></div>
    </div>
    <div class="kmi-text-fields">
        <label class="label" ng-bind="'mailbox.tag' | translate"></label>
        <div class="tag-content">
            <div class="tag-item" ng-repeat="tag in dialog.mailItem.tags">
                <label ng-bind="tag.name"></label>
            </div>
            <div class="tag-item" ng-repeat="tag in dialog.mailItem.receiverTags" ng-show="tag.isSelect">
                <label ng-bind="tag.name"></label>
                <button class="mdl-button mdl-button--icon" ng-click="dialog.cancelTag(tag);">
                    <img src="image/icons/clear.png"></img>
                </button>
            </div>
        </div>
        <!-- 20221024 modify by Alan for#120994 : 更換icon -->
        <div class="tip search tip-input" ng-click="dialog.addTags();"><img src="image/smes_v340/W_Com_SS_Add_nor_32.png"></img></div>
    </div>
    <div class="kmi-text-fields fields-description">
        <textarea ng-readonly="dialog.mode != 'write'" ng-model="dialog.mailItem.content"></textarea>
    </div>
    <div class="kmi-text-fields fields-input phrase">
        <div class="kmi-button kmi-button-confrim" ng-click="dialog.loadPhrase()">
            <label ng-bind="'mailbox.phrase' | translate"></label>
            <div class="kmi-can-click"></div>
        </div>
    </div>
    <div class="tool-content">
        <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1 btn-send"
            ng-click="dialog.send()">
            <!-- 20221024 modify by Alan for#120994 : 更換icon -->
            <img src="image/smes_v340/W_Com_Send_nor_32_w.png"></img>
        </button>
        <!-- 20220725 modify by Alan for#100246 : 補上搬遷時遺漏的按鈕 -->
        <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1"
                style="margin: 0px 2px;" ng-if="dialog.mode == 'read' && dialog.mailItem.need_release_btn == 1" ng-click="dialog.receive_and_freed()">
            <i class="material-icons" style="font-size:24px;transform: translate(-50%, -50%)">pan_tool</i>
        </button>
        <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1 btn-reply"
            ng-click="dialog.reply()" ng-if="dialog.mailItem.slight_state > 0">
            <!-- 20221024 modify by Alan for#120994 : 更換icon -->
            <img src="image/smes_v340/W_Com_Send_nor_32_w.png"></img>
        </button>
        <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1 btn-direct"
            ng-if="dialog.mailItem.LinkProgram!=''" ng-click="dialog.redirect()">
            <img src="image/icons/link.png"></img>
        </button>
    </div>
</div>
